package com.koron.sinoprobe.web.ledger.bean.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author twcao
 * @title: ProjectOverviewStat
 * @projectName GDH_EAM_V2
 * @description: 项目概览统计
 * @date 2021/12/1414:32
 */
@Data
@Accessors(chain = true)
@ApiModel("项目概览统计")
public class ProjectOverviewStat {

    @ApiModelProperty("合计(规划中、进行中、已完成)")
    private int total;

    @ApiModelProperty("统计")
    private List<KeyValue> keyValue;

    public int getTotal() {
        return keyValue.stream().mapToInt(KeyValue::getNum).sum();
    }
}
